import request from '@/utils/request'

// 查询商品订单列表
export function listCommodityOrder(query) {
  return request({
    url: '/shopping/commodityOrder/list',
    method: 'get',
    params: query
  })
}

// 查询商品订单详细
export function getCommodityOrder(id) {
  return request({
    url: '/shopping/commodityOrder/' + id,
    method: 'get'
  })
}

// 新增商品订单
export function addCommodityOrder(data) {
  return request({
    url: '/shopping/commodityOrder',
    method: 'post',
    data: data
  })
}

// 修改商品订单
export function updateCommodityOrder(data) {
  return request({
    url: '/shopping/commodityOrder',
    method: 'put',
    data: data
  })
}

// 删除商品订单
export function delCommodityOrder(id) {
  return request({
    url: '/shopping/commodityOrder/' + id,
    method: 'delete'
  })
}
